package com.woniuxy.automotivemanagementsystem.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.woniuxy.automotivemanagementsystem.entity.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface UserMapper extends BaseMapper<User> {
    @Delete("delete from user_role where uid=#{uid}")
    void deleteUserRole(@Param("uid") Integer uid);
    @Insert("insert into user_role(uid,rid) values(#{uid},#{rid})")
    void insertUserRole(@Param("uid") Integer uid,@Param("rid") Integer rid);
}
